import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useTemporaryStore = defineStore('temporaryStore', () => {
  const addDrivingSchoolInfo = ref({})
  const chooseDrivingSchoolCombo = ref({})
  const payOrdersNo = ref('')

  const getAddDrivingSchoolInfo = () => addDrivingSchoolInfo.value
  const getChooseDrivingSchoolCombo = () => chooseDrivingSchoolCombo.value
  const getPayOrdersNo = () => payOrdersNo.value

  const setDrivingSchoolInfo = (data: object) => {
    addDrivingSchoolInfo.value = data
  }

  const setChooseDrivingSchoolCombo = (data: object) => {
    chooseDrivingSchoolCombo.value = data
  }

  const setPayOrder = (ordersNo: string) => {
    payOrdersNo.value = ordersNo
  }

  return {
    getAddDrivingSchoolInfo,
    setDrivingSchoolInfo,
    getChooseDrivingSchoolCombo,
    setChooseDrivingSchoolCombo,
    getPayOrdersNo,
    setPayOrder
  }
})
